<?php

namespace App\Http\Controllers\Member;

use App\Http\Controllers\Controller;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class BaseController extends Controller
{
    //
    public function create()
    {

        return view('member.base');
    }

    public function store(Request $request)
    {
        $request->validate(['name' => ['required', 'min:3', 'max:50']]);
        $user = Auth::user();
        $user->fill($request->only('github', 'name', 'weibo', 'wechat', 'qq'));
        $user->save();
        return back()->with('success', '基本资料修改成功');
    }
}
